Added logging support to promises