Added a promise to writeImageToFile which resolves when the finish event has fired from the write stream thereby fixing a race condition.
Added a promise to writeImageToFile which resolves when the finish event has fired from the write stream thereby fixing a race condition.

vmpowerio/chartjs-node