Test file locking