Added file support and a basic test.