handle the one-entity-per-file case