Use a logging module for better log handling. Convert all console.log() calls with logger functions based on their importance.