Added better log file handling.
In pilot-job-list modified a way to get job IDs.