added proper method to identify file types by binary