removing dependence on flock so this will run under osX...