Close file if we abort