Auto-detecting binary file input