fix double freeing of collection filename in case collection cannot be opened