Crashed, open file has null pointer