added line logging for error trapping