rename filename according to function name