Preparations for better logging