Added untested code for reading files.