Changed sysout to logging