better error handling, add option for autocrop
update readme and flexRatio option