Enhanced the shell_check function to handle both 'bash' and '-bash' as valid shells, added a debug message to display the detected shell, and changed the exit code to 1 for clearer error signaling.