Better logging added