File locking fixes2