fixed hash1 input, added file saving