button injection improved
Using API to calculate file sizes
fixing #2