Error handling for server start and stop.