Improving error handling

Just thought I would add commander to improve the error handling a bit,