Update relaod function for various file endings