move the Fatpacking trace code back to script