fix lockfile handling by the cron