add useGeneratedLock flag
Merge pull request #27 from rspieldenner/use_lock_flag

add useGeneratedLock flag