in case of sending the file we just recieved with the same file object, we will get the pointer to the start and move the close operation to end of enclosing function.  plus minor cosmethic changes