fixed binary mode file mode. fixed hashstash missing file error handling