Locking is enabled by default. When file is opened with appending mode, it's safe to write concurrently to a file. In this case user can choose to disable the lock.