catch exception for debug setting