fixed file permissions and xml gen