fix #36: now using .lock file for locking because of flock is strong environment-dependly