added errorHandler, shutdownHandler