changed error message
removed debug messages