Prints only start of invalid lock result buffer in case of failure

introduces HexPrinter utility for this neat printing.