properly close files using with statement
Merge pull request #6 from felixonmars/file-close

properly close files using with statement
add an option to disable notify