more consistent input/output file handling
cleanup warnings/imports