logging system out and err