Added comments, changed default value for tmp_file