Put handling of engine output in separate routine