 	copyFile: (bucketName, sourceKey, destKey, callback)->
 		logger.log bucketName:bucketName, sourceKey:sourceKey, destKey:destKey, "copying file in s3"
 		s3Client = knox.createClient
-			key: settings.filestore.s3.key
-			secret: settings.filestore.s3.secret
+			key: settings.filestore.s3?.key
+			secret: settings.filestore.s3?.secret
 			bucket: bucketName
 		s3Client.copyFile sourceKey, destKey, (err)->
 			if err?
-				logger.err err:err, bucketName:bucketName, sourceKey:sourceKey, destKey:destKey, "something went wrong copying file in aws"
+				logger.err err:err, bucketName:bucketName, sourceKey:sourceKey, destKey:destKey, "something went wrong copying file in s3"
 			callback(err)
 
 	deleteFile: (bucketName, key, callback)->

		callback = _.once callback
		logger.log bucketName:bucketName, key:key, "getting file from s3"
		s3Client = knox.createClient
			key: settings.filestore.s3.key
			secret: settings.filestore.s3.secret
			bucket: bucketName
		s3Stream = s3Client.get(key)
		s3Stream.end()

buildDefaultOptions = (bucketName, method, key)->
	return {
			aws:
				key: settings.filestore.s3?.key
				secret: settings.filestore.s3?.secret
				bucket: bucketName
			method: method
			timeout: thirtySeconds
