handling error in loadDone