close the temporary Handle before removing the file