Unit test for File driver and resulting fixes