Deduplicate file loading code
Deduplicate file loading code

This code is nearly identical for the file backend and the Sqlite
backend. Much cleaner now!

channable/icepeak,channable/icepeak,channable/icepeak