Modified to receive full pathfile