fix bug with '.' in filename