null error in file recognition