Async write

This includes my fix for issue #126
Tested and it worked

Disclaimer: Let me know if this pull request has issues (eg: bad branch)