Revert "Change to shell_exec for debugging"

This reverts commit 1c358fa4f4b0bb1168fa614f0d7d9409668c18c9.