Revise return value

Just now, forgot to return value in the function. So I did not write
any information to the file.