making application pidfile-aware for standard shutdown functionality