Use onDidChangeModified instead of onDidChange

Fixes issue where onDidChange fires twice when opening a new tab