we should check if the given path is a folder as well