Fix for non exiting agent when run in one-time mode.
Fix for File.pm warning.