added exception if file type is not supported