better file access API avoids double key lookup