Remove classes_with_attachments
Move the check for path collision out