Changed error message to print to err