fixes tofile, there was a small ordering error with linked files