added grep library for connection notification and improve logs