changed strategy for retaining file extension