Revert "Fix missing fi and indent"

This reverts commit 0331c79add0eecff4d8a400fb197d5633055f872.
Revert "Fix to create /data/crash if needed."

This reverts commit 3907b735dd3dadbacd01a1a63b895f3fd356679c.