Added if block at writeBlock() method to choose whether the block will be written in ASCII or in BASE64.