added optional parameter for setting file modification dates explicitly for testing purposes