reconfigured di
added initial views
check that directory is writable, refactored getFiles