Fix logging and packaging