working on write file (compiling only)