Refactored to use file type instead