Fixing issue #4. Putting debug info to stderr.