fixed readfile functionality
Merge origin/master