fix issue #4 and fix File Overwrite