bam.c bam.h; cmdline validity check