updated code to check more license parameters and to run continuously