Added second parameter "path" to findFile and findDirectory.
Also redirected printing of errors to /dev/null
formatted function