Added IO encoding option
Added option for auto encoding detection
Fixed condition of utf-8 file detection
Deleted unnecessary option