Add file locking