fix error handlings when initialization.
Merge pull request #100 from cubicdaiya/issues/error_handlings

fix error handlings when initialization.