Added better error handling to load