add pattern file
backup in main