use mimemagic to detect if file is binary or not