It stops at the end to wait for input, should auto-detect it's not being run interactively and not do that.