The personnel file for a Carwise Middle School resource officer who retired amid sexual harassment allegations this week shows a nearly spotless 20-year history with the Pinellas County Sheriff's Office.Deputy Bernard D'Agostino, 52, was hired by the agency in 1998. Exactly 20 years later, on Oct. 1, the Sheriff's Office received a letter from a female school employee alleging he sexually harassed her.D'Agostino, who had no other formal disciplinary problems while employed by the Sheriff's Office, retired Tuesday, when the agency opened an investigation into the allegations and notified him that he would be reassigned to regular patrol duty.The deputy's 191-page personnel file shows he was praised for good attendance and received recognition for being a safe driver. It contains notes from residents — even parents from Carwise — thanking D'Agostino for his service.Records show he received multiple "satisfactory" ratings on evaluations, which is the average rating a deputy can earn.D'Agostino first requested to be considered for a school resource officer position in 2000, then again in 2001. He was moved to the sheriff's youth education section in 2003, records show.Three years into the role, a supervisor met with D'Agostino about his "ability to communicate and bond with the children and teachers" at youth events. He was urged to be more helpful and organized.The same year, D'Agostino was reprimanded for not being helpful at a Florida Sheriff's Youth Ranch summer camp, records show. A supervisor wrote he "did not exhibit a professional attitude.""When asked to present a short class to the children, he refused," the report said. "Other deputies assigned to the camp felt Deputy D'Agostino's heart was not there for the children."The file included no other incidents related to sexual harassment.D'Agostino could not be reached for comment by the Tampa Bay Times. According to Pinellas County schools spokesperson Lisa Wolf, the district is working with the Sheriff's Office to replace him at Carwise.In her letter to the Sheriff's Office, the school employee said D'Agostino "squeezed me around the waist" one day in September. On a second occasion that month, the deputy compared a banana to male genitals in conversation with her, the letter said.In interviews with investigators, D'Agostino said he could not remember the first alleged interaction. He admitted to the second, but said he did not intend to compare the fruit to genitals, the Sheriff's Office said.Contact Megan Reeves at [email protected] Follow @mareevs.