Created error checking for filename

If filename is not given, generate one from system time. Otherwise
continue with function

Edit: Probably going to move this check into a specific function