don't write file if main is `index`