Since you have a reference to project, you don't need to use workspaceRoot, You can simply use
project.getFile( path ).exists()