Wont use lock if the alwaysCreateNewNodes is true.
Added checkbox to set whether the user wants to set the MATRIX_ID environment variable.
Default is false