upgrade some old file and logic.