improvements on file lock per bz916625