add messages, use directory instead of folder, check for regular file