Added check for debug message