fix error in output when mvn command fails

mvn command fails when outside any maven project, and we don't check
that before execution