Added some more tests and checks.
Catch error