added -w switch to editor being called