Narrow the scope of *local* and print error message
Merge pull request #3 from tokubass/check_file_handle

Narrow the scope of *local* and print error message