It seems like you forgot to check whether the `t-substring` starts with "file://" (in which case you have to ignore the first 7 characters)