Fixed errors from previous commit

- Did not take into account editing file while running IG
- Removed assumption that all scopes default one rather than just global