This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
What's your definition for the Action function? Without that it is not really possible to think of what the problem might be. My guess is that Action has the ability to calculate file sizes in human terms (converting to Kb, Mb etc) and is not handling zero sized files correctly.