fixed bug in serving html files
added mimetypes checking