Fix crash due to case clause {error, timeout}

* Fix crash cause by missing case clause
* Cleanup code and remove export_all
* Add .gitignore