more error handling
Merge pull request #24 from yonderHub/loop-inteface

more error handling