Use more efficient file handler
Move metrics file into settings
Pass args instead
Remove line