Added logcompress function