System signal catching to avoid crashing as much as possible