Added Custom Error Handling