Add flock support