change invokeSignal to emit, add method invoke api
save to file functionality
save file