improve name generating
improve target name calculation; add config for logging