Added saving queries in hash file functionality