added download support in the popup window