Added input.close()