Could it be you have your /echo command logged, but not your /aline ...?

My suggestion is to add an on close event for your @window that saves the contents of that window to a file.

You can do the same for the /clear @window command