Added function names to the error handlers