add assertion when opening file