Only log/prepare for classes that are not already inserted