add background exception handling