Move filename check so pysam doesn't complain