Handles basic terminating errors, outputs to error log