add some error handle