needs full path of file , test error when directory not exists