logging and fix scipy