Changed sending file to reading and sending chunk by chunk