refactored file extension removal into the MediaFile class