change system.err.print to using java logging api