added some logging to debug library