Improve logs output for the main function