Created receiveFile function