Error handling and completing the Server mode