better logging to support custom prefix