Remove on error and add some console logs