calculate file size

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>