log data to console and refresh on success