Implement logging module instead of print messages.