graph 2 a la Pilát :) + safe removing of dir