Thanks!
Actually, I did write the code on my laptop and subsequently put it on a workstation via remote access. I even changed the code there and put it back on my laptop, etc. (+ I work on Windows on both machines) So this could be it. However, I deleted my temp files (I believe this is were it is automatically written to?) and put auto_write = FALSE, to be sure. However, it still crashes after 1 or 2 loops.
Any other suggestions?
Many thanks,
Alex