used flock
fixed coding style in module ``flock``