Add editor environment variable so git will use vi
Add an error case and update assignments