#678 - fix error logging, handle xXx names, general cleanup