Catch possible flush errors