replace the println debugging statements with proper logging statements