add save rcfile utility
add list length check
add debug macro
avoid to free keyfile