Made few script changes to pick up with proper permissions