Fixed stdout/stderr redirection to log