set up file writing in the non-lib folder