Improve compression ratio. (Removed redundant flushing)
Add error detection to custom build setting.