Error when browser doesnt support file api ; canvas reading helper function