Move logging configuration to the main script for make it self-contained