Change file type check to keep compatibile with go 1.0