Optional Compression and output directory fixes