Also got rid of trailing white space. That corrupted .git/. Big ass-commit because of recovered .git directory.
This won't work with optimizations turned fully on. Added protection against double panics.