erlang_magic is Erlang interface to the libmagic use NIF