Mimetype dependent on file added to headers instead of hardcoded one. Missed that completly.