#1038 Added some logging