#850 fixed.

Check that files exist before adding them to the list.