long-overdue exception handling, moving file import to separate
namespace