Detect from input file name by prev map