This is an really old question and don't know why did not done till now ...
simply why mikrotik command line not support redirect output to a file as linux command ">" to great output file or as ">>" to update exist file ?
This really need all your attention mikrotik staff. and can help all developer to create and use good ideas with script
hope can be done as soon as possible