fixed race condition, added redo target comand line option