solved segfault problem in write_itable function
changed path to format