finish adding kb_* functions for FILE_MODE