added basic file model
use new file model
better error handling