Added flush file and fetch file to persistent storage