write script errors to stderr