added init logic for non empty path