Fix crash with invalid files in sessions and invalid xml

Change-Id: I59b5b31def73578ad2bda413c416d8eb9413fce0
Merge pull request #88 from tribal-tec/master

Fix crash with invalid files in sessions and invalid xml