added check  for AddingToOutputpipe in notify()