Added async
writing out file