Don't burn up the CPU trying to read from sys.stdin

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Parameterize out some values

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
Need to setup the logging handler before calling app.run

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>