Moved error output to cerr