Getting rid of a few warnings
Logging and proper agent disconnection from server