Re-throw exception after logging

This will fix #54.