this line can be removed because close() unlocks it.