Fixing echo location so output will go to the correct place