Use passthru() instead of exec() for (binary) data.