Fixed some issues.

Sending packets will use header, sending files will use start and end
flags along with file size.