Write to stdout function added. Useful to debug, useless to release.