encode for loading subfiles