Improved error checking when loading room legend file