Backreference adjustment script: Add a feature to read and overwrite the same file