Add online callback to cmd line app and tests