1. fixed typos in InputWithTimeout implementation.
2. Output.write(a) now returns writted element.