Modify documents on extension