Changed writeFile to asynchronous and made options an Object.