adding some more logging and allowing the client to log to stdout