Improving error messages, also handling segmentation faults in a better way