Changed stdout printout to encode to ASCII and ignore errors.