added done loading and err message