removed extra closelog calls