added debug messages, changed number of read response bytes to 8 bytes, seems to work
fixed minor issues