Cannot load data from cypher script

When I use semicolon at the end I get below error. I used semicolon after the final right parentheses. Same query works when logged into cypher-shell

invalid input 'p': expected 'n/n' or 's/s'