Added check to see if STDOUT is defined

See issue: https://github.com/Indatus/dispatcher/issues/42