Add in missing error check
Check file is not a symlink before returning it