Fix error clean up code to match lesson
Some compacting of the return for res_path