Basic error message will be displayed instead of detailed error messages in case of errors
Moved the error-handling code to a separate file