Added case statement so that we can easily add checks for different filetypes