Fix a memory access violation, fix endianness in ACK packet, fix filename and mode in RRQ packet, enable debug.