correct mistake of global variable
don't write file id to hash string
improve read mode