Added basic error checking on file loads