Added error handling in cases where we can't index some file e.g. for
permissions