indentation in write.c ; add exit(1) for error debug