adding if defined check for PSM_DEBUG const
fixing if-config exists check