Removed instances of System.err because I'm not sure it's supported.