wrapper around flock