Bug fixed

Fix some file reading issues