lock job file to prevent simultaneous execution