fixed bug in file naming