more error checking for mesh_loader