Adding USR1 signal handling