Added possible filters for STDERR log.
Tidied the code.