Currently handles automatic file closing