gave file appropriate extension