completely ignore empty lines
fix mimetype that can be absent