Improve checks for binaries