fix log input/output order