Don't set filename if there isn't one
Added logging back in