Removed debug error function