Update agent.php

bug for fileName