auto file deteect