fixed typos and steamlined logging for readability