Added specific error types rather than generic error types