handle localfile and localfilepointer differently