Don't print to console, add an error function