Updated print function

Updating print function as io::println is outdated