renamed file queue, used write_batch instead of write. Added some documentation