Better Java style to pass debug in as boolean flag and convert to int inside method.