moved the debugs to stderr.