Changed print into a logging command