created function.data to make sure file exists and could be acessed
tried to fix some memory initialisation bugs. (only partly fix in part-diff-seq.c:104)
Fixing the memory errors is necessary to make valid calls to fopen