Fixed error handling
Converted tabs to spaces
v0.9.5