Working on stdin/stdout functionality