Remember to delete the temporary file at the end.