Added 1 check for EDITOR var, if EDITOR is set to "" + added try catch to catch subprocess error like EDITOR variable pointing to a non installed editor