Lock file as a string