added sleep before restarting monitor agent