changing database to allow for filename reading, created functionality to real files in directory