setting log_location correctly in code