cleanign up errors I entered into the code and clean up logging