Enhance error-handlings, test-coverage.