Add error handling to SNMPReplayServer and some source refactoring.