use local opts
formalize return callback style
Fix: Logic error determine whether to compress