adding proper extension to file