Save Varriable value to a file

Dears ,
Please i want support urgent i have to issues

  1. i use:
    (:global “lte_command” [/interface lte at-chat lte1 input=“AT+CFUN=1” as-value wait=yes
    how can i get the AT command response on the screen to save it in a text file or any file ( i mean how i save the varriable value to file instead of printing it to screen by put)

  2. second issue .. when i use AT commands which require a llonger procress time … it produces this error
    [admin@MikroTik] > :global “a” [/interface lte at-chat lte1 input=“AT^netscan=10,-110,3” as-value wait=yes ]
    action timed out - try again, if error continues contact MikroTik supp
    ort and send a supout file (13)

SO how can i extend the timer of the mikrotik so that it can wait untill the response comes from the module.