Fix output stream bug.
Fix unprotected string output.
Add extra hashed block test.