added cleanup procedure for target dir