Cleanup: removing debug println, upgrading Exception to IOException