Save the class ids to a file