Real versus financial frictions to capital investment