read files from db