Agent file should supports comments and empty lines

Implements #340