added file functions for writing combining spliting and globbing