Add compression and error handling