Adding logging instead of print.