made examples callable and added the error handling to a function
format
change path in StorageDir from String to TachyonURI