Client terminates after receiving the file.

Some unwanted code removed.