you should synchronize on something here.  `file` maybe.