Added debug flag for additional security to caller