Debug flag and rm intermediate output