Fix a critical bug in posix scripts | Add new flags | Major improvements to non-interactive logging.
Almost all edgecases/mistakes have been handled, both in sync and upload scripts.
Handle all cases for reading input when not in terminal.
remove some unnecessary code execution