take file path and compute file size correctly