Implement output into file