Fixed nil file error