Refactor to allow checking of files/directories/symlink over the network