base: File API

Makes sense. I agree with having a second error callback. But it should be optional. Do we also call the main callback with ```null``` content? Because this API should be usable without having a separate error handling function.