added method to the DebugLogger that prints stacktraces
catch exceptions thrown while receiving the data that will be stored to prevent the loss of all pets