Ignore error when getting file when path is not valid.