Fixed a bug where the files list would not be initialized before use.