Made the logger print to stderr in applicable situations