Changed lots of StdErr.println to logger for consistency