added Debug option

replace deprecated function