added log.c
called createlogdirectory segfaults