Change alert to console log