Lock file mechanism implemented.