ini_file: replace lambda with named function