re question 1: if you journal the PF, you can determine what was deleted and restore the data.
re both questions: you really need to provide more information if you expect to get a reasonable answer. Try to include OS version, language(s) being used, and if possible samples of code causing the problem. Also, be sure to include enough code to see the problem line in context, as many times problem at point a causes line at point b to fail.
hope this helps some — BigKat