Added -D flag support