#2197: File type checking and nonsense.