Refactored from SYSOUT to Log4j debug.