Enabled sending data to stdout. Fixed some warnings