Added exception for debug mode