use fcntl.lockf instead of fcntl.fcntl