Debugging fopen; not writing email to file even with chmod 777