Close open file pointer
Make content-type check case-insensitive
provide link to csv error log