Instead of creating extra promise, it would be much cleaner to do it as:

```javascript
return  stat(doc_metadata.path).then(function () {
  // you're logic
});
```