Moved console log into done callback