Adding logging and compression