Added error checking to LoadFile to catch NULL pointer errors when the file specified can not be loaded or is empty