fixed a bug in SHA calculation in streaming
improved randomness for file paths