debug flag works