File identification tool based on libmagic