Added print and log functions