Be smarter about file interlock