Don't forget these funky edge-cases -- they need to work with custom file extensions as well