Generate helpful messages when image or size was not found
Fix output/error pipe handling
Cleanup code
Update deps