incorrect variable used for filename