Let filename be a parameter of index tree output.