Revisit this code. the "files" directory is not normally in the db, it just happened to be in mine accidentally as part of its history