logging and fixed magic url