add check for tree is null before populating file list
Merge branch 'core-refactor' of github.com:webdetails/cpf into core-refactor