Fixing problems with file ordering