Modify plugin to automatically open viewer on save