Added the error handlers. Later on, we'll add a logger.