Added error messages if exceptions are thrown