moved groovy code to FileStoreHelper.java