Added callback support for unp.openDocument