support for $input_mode with txt file