Fixed fopen always gives you last file.