write synchronously to write_sync.txt
write asynchronously to write_async.txt