Update:: Replaced mime_content_type() with finfo_open. mime_content_type deprecated