added support for symbolic links and fixed cli error