On the cohomological dimension of finitely generated modules