Changing printf for log