Add debug log - some more protection