inserted if statement for bed file splitting