Add set-offline function.