TWI_init(): added check for previously openned file
added CFLAGS
moved setsockopt() in front of bind()