call hash.end() after piping file through it