Fixed bug with output redirection to log and default logger + Small improvements