switched from phalcon events to register shutdowns to ensure pid & debug are called, also added required files in debug