Added exception handling on netcommand flush