[#7] improved send window validation and error handling