generate ignore_file correctly