Bug checking file extension for type