Exception handling added to file extensions