catch unicode error and print logging to help understand behaviour before refactoring