Prevent Panic when errors occur

*Print a critical error instead of creating a panic if an error is encountered

Impact: Critical