add loggin to stdin snippet