add a function to calculate file's size