Moved ACK-sending after processing.
Increased packet size from 1024 to 524288 bytes
Decreased size from 524288 to 51200 bytes.
Fixed file transfer after packet size increase.
Removed deprecated debug code.