Called function with random number, added log of generated random number