Added capabilities for server to stop serving on error, useful for debugging.