Improved handling of files with invalid timestamps
Fixed a bug with metadata lookup.