multi threading to allow non-blocking write to disk