diff --git a/www/cap.php b/www/cap.php
index 73380e1..573968f 100644
--- a/www/cap.php
+++ b/www/cap.php
@@ -15,14 +15,29 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
+	function existsordie($path) {
+		if (file_exists($path)) {
+			return;
+		}
+		trigger_error("required file missing ($path)", E_USER_WARNING);
+		include("../includes/account.php");
+		showheader(_("CAcert.org Error"));
+		printf(_("Sorry, forms generation is temporarily unavailable"));
+		showfooter();
+		exit;
+	}
+
 	if($_SESSION['_config']['language'] != "ja")
 	{
 		define('FPDF_FONTPATH','/usr/share/fpdf/font/');
+		existsordie(FPDF_FONTPATH);
+		existsordie('/usr/share/ufpdf/fpdf.php');
 		require_once('/usr/share/ufpdf/fpdf.php');
 		class PDF2 extends FPDF
 		{
 		}
 	} else {
+		existsordie('/usr/share/fpdf/japanese.php');
 		require('/usr/share/fpdf/japanese.php');
 		class PDF2 extends PDF_Japanese
 		{
