Added specific for error handling instead of ordinary exceptions exceptions with error messages.