Thanks guys for all your comments. Through printf I see that the names are not correct for some reason except with txt_for_dir. I dont know why, tried increasing nexus, checked if some define interferes and all the path suggestions by Malice. I quess its something related to this project but its to big now and almost completed that its bit of finding a needle in haystack, so I will use Malice's suggestion of using txt_for_dir multiple times.