output cram instead of sam when cram is requested
refactoring