Fixed file cache directory creation and exception catching