print filename + method when error accours