Add encoding option when reading files