Change annoying alert() error message to console.log()