Better input file extension handling.