improvement to process thread

code was shortened by using binascii.b2a_hex
thread terminates after it runs