when not in background mode, we do not close stdin,stdout,stderr, and add a streamhandler
check to add only one stream handler