added import of sys module in def just 2bsure line 77 -> 80:sys.stdout