hack to work with file system and s3 both