update_extension function

Update file extension