return err before mongodb kill

For issue https://github.com/deployd/deployd/issues/389