Rename log function to print

Otherwise it conflicts with logarithm function.