Transferring a file in pieces working

Signed-off-by: Umair Khan <omerjerk@gmail.com>