Add more logging and module exception handling.