Throw exceptions if logfiles could not be written (#771)
Basic debug output for frontend (#771)