Async write of files