use realpath for loader