LPS-40597 Added check for parent folder