Added a logging feature