moved error check
Merge pull request #67 from SandyWalsh/move_err_load

moved error check