cleanup #229 to output correct hex and always construct insert statement in the same string