added some error checking/reporiting into ui