readcmd was redundant. use readmags for both cmd and mags files