better logging added