Added logging to console