Add encoding for listing files. Add tipe difined by type