generate file according size and path