Added write file and open method to pop new tab when you click publish
PKG