add null checks for file contents
fix demo url