Fixed syntaxtical errors in lock file check.