added specify filename

Added ability to specify filename.  Also added return function that
will return the last filename