fix path and permission issues