- update p_file function
 - add example