Extracts code to file