changing puts to log and changing default location for log file
updating to log the request