custom input file encoding bug fixed