added file size calculation for input directory