added fcntl-style file lock in recorder