writes files asynchronously, a bit of public api docs in the readme