Cleanup + warning while storing in a file

Commments and message cleanup
Corrected continuous warning when dumping the stream to a file