Fixed implementation to properly resolve capture output location.