Fix syntax error and `build files remain in source dir` error