Create helper module

Split function db.printFileList to db.getFiles and db.printFile to
avoid print usage in db module.
db module should not show any data inside its methods.