how to catch module fail