bug fixes and add debugging info to FD powerflow