changing system prints lines to use logging