resolved seg fault | added error msg to main | fopen uses the YOUR CURRENT path, not the path from the excecutable
merged main.c