fixed output flags in serial init + added listening code after fw write