put telexcc debug code inside a macro
error checking in getfilesize
error checking in fdprintf
error checking for socket