@peterflynn is correct that beforeProjectClose never fired on app quit.