I would also appreciate greatly if you included tests for files that can not be written to, read from, created at all, malformed, or empty.