added putfile option