added log file and cuda global variabl