Add some error handling and renaming variables
load xml file, add some variables