Replaced success and fail callbakcs to onDone