Remove logging to console, return error object in the callback