Added support for reading from files.