fixed null pointer to non existing file