use flock instead of lockfile