error handling for level loading