Adjusting guard

Adjusted the guards so that the bash commands would not execute if the file config file does not exist.

Only adjusted gitigtnore and log_agent.rb, the other changes came from the master.