Profile may not exist when generatin the invoices. Try catch it

Try to get the profile, exit if it does not exist