diff --git a/Library/Compiler.php b/Library/Compiler.php
index <HASH>..<HASH> 100755
--- a/Library/Compiler.php
+++ b/Library/Compiler.php
@@ -428,14 +428,16 @@ class Compiler
 			}
 		}
 
-		/**
-		 * Load additional extension prototypes
-		 */
-		foreach (new DirectoryIterator(ZEPHIRPATH . 'prototypes') as $file) {
-			if (!$file->isDir()) {
-				$extension = str_replace('.php', '', $file);
-				if (!extension_loaded($extension)) {
-					require $file->getRealPath();
+		if (is_dir(ZEPHIRPATH . 'prototypes') && is_readable(ZEPHIRPATH . 'prototypes')) {
+			/**
+			 * Load additional extension prototypes
+			 */
+			foreach (new DirectoryIterator(ZEPHIRPATH . 'prototypes') as $file) {
+				if (!$file->isDir()) {
+					$extension = str_replace('.php', '', $file);
+					if (!extension_loaded($extension)) {
+						require $file->getRealPath();
+					}
 				}
 			}
 		}
refs #NA Check prototypes folder before interator it