Try to use system instead of exec

Maybe exec has some limits in the output lines it can capture...