create log directory and fixed copying to public
added flag to check relative file in public directory