compatibility to latest when-promisify updates
better error handling