Handle error messages better and update todo