Fix the function sending the file (the code was for a later version)