Fix gzip bug of filter.
Add debug output and fix carriage return error.