correcting use of stderr for errors