Fixed errors while gzipping logs