- Change max_width/max_height to use the actual maximum sizes
- Use standard logging interface