fixed error catch for determining file size