fix: cleanup open files in "certificateProfile"