     }
     
     public class func openFile(#relativePath: String?) -> NSData? {
+        
         if let path = relativePath {
-            let absolutePath = Warehouse.translateRelativeToAbsolute(path)
-            let data = NSData(contentsOfFile: absolutePath)
-            return data
+            if let absolutePath = Warehouse.translateRelativeToAbsolute(path) {
+                let data = NSData(contentsOfFile: absolutePath)
+                return data
+            } else {
+                return nil
+            }
         } else {
             return nil
         }

        return paths.first as String
    }
    
    public class func translateAbsoluteToRelative(path :String) -> String {
        if path.hasPrefix(self.homeDirectoryPath()) {
            return path.stringByReplacingOccurrencesOfString(self.homeDirectoryPath(), withString: "", options: nil, range: nil)
        } else {
            return path
        }
    }
    
    public class func translateRelativeToAbsolute(path :String) -> String{
        if path.hasPrefix(self.homeDirectoryPath()) {
            return path
        } else {
            return self.homeDirectoryPath() + path
        }
    }
}

    
    public class func fileExistsAtPath(#relativePath: String?) -> Bool {
        if let path = relativePath {
            if let absolutePath = Warehouse.translateRelativeToAbsolute(path) {
                return NSFileManager.defaultManager().fileExistsAtPath(absolutePath)
            } else {
                return false
            }
        } else {
            return false
        }
