changed warning stream from stdout to stderr