Added patch for file lock.