Fixed bedtools check function