fixed bug related to empty file contents