Adding error handling to compression utility.