Fixed race condition, added redo target commandline option