-- used getPath instead of getName to get file path