* added file locking
* added close function that verifies all file writes are completed
* updated docs