Added replace_extension