Fixed bug with stdout usage