Fixed race cindition, added redo target commandline option.