Updated error output: it will now go to stderr instead of stdout