added better logic for getting a files creation date