Change folder access to enhance compatibility with absolute URL
some fixed and naming functions to make debug easier