refactoring for http put
monkey patch File stat