save class metadata and autoimport in file iterator