Fix up imports.
Remove obsolete tests.
PTFM-6910: print partial error message when it's not valid UTF8.