Log finally working with Javascript