modified build_file method to take up to two parameters instead of up to three